<script setup lang="ts">
import Header from '@/components/header/header.vue'
import NavigationBar from '@/components/navigationBar/navigationBar.vue'
import Footer from '@/components/footer/footer.vue'
import LoginPage from '@/components/loginPage/loginPage.vue'
import { provide, ref, reactive } from 'vue'

// 控制是否显示微信扫码页面
const loginType = ref<boolean>(true)
const key = ref<number>(0)

// 商品搜索
const searchFn = ref<null | string>(null)

// 用户信息
const userInfos = reactive<{
  coin: number
  headImg: string
  nickName?: string
  uuid?: string
}>({
  coin: 0,
  headImg: '',
  nickName: '',
  uuid: '',
})

provide('data', { loginType, key, searchFn, userInfos })
</script>

<template>
  <Header :key="key" />
  <NavigationBar />
  <RouterView />
  <Footer />
  <LoginPage />
</template>

<style scoped></style>
